﻿/*
Copyright © 2010 François Karman

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

See <license.txt> for the complete license of the software.
*/

namespace Ghost.Tasks.Hg
{
    /// <summary>
    /// Retrieves the changes from a specific source.
    /// </summary>
    [Command("pull")]
    public class HgPull : AbstractHgTask
    {
        /// <summary>
        /// Gets or sets a value indicating whether the tip
        /// should be updated after the pull.
        /// </summary>
        [Parameter("-u")]
        public bool Update { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the pull
        /// should be forced.
        /// </summary>
        [Parameter("-f")]
        public bool Force { get; set; }

        /// <summary>
        /// Gets or sets a specific revision up to which the pull
        /// will be done.
        /// </summary>
        [Parameter("-r")]
        public string Revision { get; set; }

        /// <summary>
        /// Gets or sets the ssh command to use.
        /// </summary>
        [Parameter("-e")]
        public string Ssh { get; set; }

        /// <summary>
        /// Gets or sets the source of the pull.
        /// </summary>
        /// <remarks>
        /// If omitted, a default path could be used. This one
        /// should be defined in the workspace configuration.
        /// </remarks>
        [Parameter("")]
        public string Source { get; set; }
    }
}
